package com.mytime;

import java.util.List;

import org.json.JSONException;

import com.mytime.entity.Event;
import com.mytime.util.Date;
import com.mytime.util.Time;

public class Schedule {

	private List<Event> events;
	private Date scheduleDate;
	private String startTime;
	
	public Schedule(Date date) {
		scheduleDate = date;
	}
	
	public List<Event> getEvents() {
		return events;
	}
	
	public void setEvents(List<Event> events) {
		this.events = events;
	}
	
	public Date getScheduleDate() {
		return scheduleDate;
	}
	
	public void setScheduleDate(Date scheduleDate) {
		this.scheduleDate = scheduleDate;
	}

	public String getStartTime() {
		return startTime;
	}

	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}
	
	public void organize(Time startTime) throws JSONException {
		events = ScheduleOrganizer.organizeSchedule(startTime);
	}

}
